/*
 * MenuItem.h
 *
 *  Created on: 2009-10-28
 *      Author: zhujiao
 */

#ifndef MENUITEM_H_
#define MENUITEM_H_
#include <w32std.h>
#include <gdi.h>

class CMenuItem : public CBase
        {
public:

        CMenuItem();

        ~CMenuItem();
        
        void ConstructL(const TDesC& aTitle, TInt aCommand);
        void ConstructL(const TDesC8& aTitle, TInt aCommand);
 
        TInt GetHeight();
        
        TInt GetWidth();        
        
        TDesC Getname();
        TInt GetMenuItemTitleStrLen();
        
        void SetRect(TRect aRect);
        
        void Draw(CBitmapContext& gc) const;

        TInt GetCommand();
        
        void SetFocus(TBool aVal);

private:
        HBufC*		iName;
        TInt		iCommand;
        TBool		iFocused;
        TRect		iRect;
public:
	const static TInt ITEM_HEIGTH = 18;
	const static TInt ITEM_WIDTH = 100;
        };

#endif /* MENUITEM_H_ */
